#
# trzeba ustawic zmienno problem np. problem = "500_2"
#

katalog = 'output/'
prefix = katalog.'output_'.problem

set term png

# wszystkie HV

set output prefix.'_hv.png'
plot prefix.'_nsga_hv.txt' with lp title 'ns', prefix.'_elEMAS_hv.txt' with lp title 'el', prefix.'_EMAS_hv.txt' with lp title 'em', prefix.'_spea_hv.txt' with lp title 'spea'

# wszytkie osobniki

set output prefix.'_individuals.png'
plot prefix."_nsga_bests.txt" title "nsga", prefix."_elEMAS_elit.txt" title "elEMAS", prefix."_EMAS_nd.txt" title "EMAS", prefix."_spea.txt" title "SPEA"

# elEMAS vs NSGA

set output prefix.'_elEMAS_nsga_hv.png'
plot prefix.'_nsga_hv.txt' with lp title 'ns', prefix.'_elEMAS_hv.txt' with lp title 'el'

set output prefix.'_elEMAS_nsga_individuals.png'
plot prefix."_nsga_bests.txt" title "nsga bests", prefix."_elEMAS_elit.txt" title "elEMAS"

# EMAS vs NSGA

set output prefix.'_EMAS_nsga_hv.png'
plot prefix.'_nsga_hv.txt' with lp title 'ns', prefix.'_EMAS_hv.txt' with lp title 'em'

set output prefix.'_EMAS_nsga_individuals.png'
plot prefix."_nsga_bests.txt" title "nsga bests", prefix."_EMAS_nd.txt" title "EMAS"

# SPEA vs NSGA

set output prefix.'_spea_nsga_hv.png'
plot prefix.'_nsga_hv.txt' with lp title 'ns', prefix.'_spea_hv.txt' with lp title 'spea'

set output prefix.'_spea_nsga_individuals.png'
plot prefix."_nsga_bests.txt" title "nsga bests", prefix."_spea.txt" title "spea"

#set output katalog.'output_'.problem.'_EMAS_elEMAS_individuals.png'
#plot katalog."output_".problem."_elEMAS_elit.txt" title "elEMAS elit", katalog."output_".problem."_EMAS_all.txt" title "EMAS"

unset output

# plot 'hv_spea.txt' with lp title 'sp', 'hv_emas.txt' with line title 'em', 'output_'.problem.'_elEMAS_hv.txt' with lp title 'el', 'output_'.problem.'_nsga_hv.txt' with lp title 'ns'    
